package org.bling.star.springserverstart.configurations;

import org.bling.star.server.ServerApplication;
import io.netty.bootstrap.ServerBootstrap;
import lombok.extern.slf4j.Slf4j;
import org.bling.star.server.connect.GlobalConnectManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class StreamConfiguration {
    @Bean
    public GlobalConnectManager globalConnectManager() {
        GlobalConnectManager globalConnectManager = ServerApplication.start("localhost",9999,null);
        log.info("globalConnectManager:{}", globalConnectManager);
        return globalConnectManager;
    }
}
